<style lang="less">
    @import '../../../styles/common.less';
    @import './preview.less';
</style>
<template>
    <div class="preview-main">
        <Row >
            <Col class="margin-top-20" span="14" offset="5">
                <div>
                    <Card>
                        <h1 style="text-align: center">{{ articleTitle }}</h1>
                        <p class="preview-publish-time" style="text-align: center">{{ publishTime }}</p>
                        <div class="preview-tags-con">
                            <b class="preview-tip"></b><Tag v-for="item in tagsList" type="border" color="blue" :key="item">{{ item }}</Tag>
                        </div>
                        <div class="preview-content-con" v-html="content"></div>
                    </Card>
                </div>
            </Col>
        </Row>
    </div>
</template>

<script>
export default {
    data () {
        return {
            articleTitle: '',
            tagsList: '',
            classificationSelected: [],
            content: '',
            publishTime: ''
        };
    },
    created: function () {
        console.log(localStorage.content)
    },
    mounted () {
        this.articleTitle = localStorage.articleTitle;
        this.tagsList = localStorage.tagsList ? JSON.parse(localStorage.tagsList) : [];
        this.classificationSelected = localStorage.classificationSelected ? JSON.parse(localStorage.classificationSelected) : [];
        this.content = localStorage.content;
        this.publishTime = localStorage.publishTime;
    }
};
</script>
